<template>
  <div class="passenger-select2">
    <el-form ref="form" :model="form" label-width="88px" size="mini">
      <el-form-item label="行政区域">
        <el-radio-group v-model="radio2" @change="onRadioChange2">
          <el-radio-button
            v-for="item in arealist"
            :key="item.value"
            :label="item.value"
          >{{item.lable}}</el-radio-button>
        </el-radio-group>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "foottype",
  data() {
    return {
      radio2: "320101",
      search: "search",
      //   suoyou: {
      //     lable: "所有",
      //     value: "-1"
      //   },
      form: {},
      arealist: [],
      date: {
        marketId: 1,
        startDate: "2019-07-15",
        endDate: "2020-07-15",
        businessType: -1,
        perPage: 5,
        page: 1
      }
    };
  },
  created() {},
  mounted() {
    this.getSearch();
  },
  methods: {
    onRadioChange2(val) {
      console.log(val);
      this.date.businessType = val;
      this.getstatisbusiness();
    },
    handleCommand(command) {
      console.log(command);
      this.isActive = false;
      this.date.marketId = command;
      //   this.getstatisbusiness();
      // this.getsharing();
    },
    getSearch() {
      this.$store
        .dispatch("marketInfoMge/getSearch", { keyword: this.search })
        .then(data => {
          console.log(data);
          let dataarr = [];
          for (let i = 0; i < data.areaCodeList.length; i++) {
            dataarr.push({
              value: data.areaCodeList[i].id,
              lable: data.areaCodeList[i].name
            });
          }
          this.arealist = dataarr;
          console.log(this.arealist);
        })
        .catch(err => {
          console.log(err);
        });
    }
  }
};
</script>

<style lang="scss" scoped>
::v-deep .el-radio-button__inner,
::v-deep .el-radio-button:last-child .el-radio-button__inner {
  border: none;
  border-radius: 0px;
}
::v-deep .el-radio-button:first-child .el-radio-button__inner {
  border: none;
  border-radius: 0px;
}
.passenger-select2 {
  margin-top: 8px;
}
.passenger-select2 ::v-deep .el-radio-button {
  margin-right: 10px;
}

::v-deep .el-radio-button--mini .el-radio-button__inner {
  font-size: 13px;
  font-weight: 400;
}
::v-deep .el-radio-button__inner {
  color: #444;
}
</style>